// 首页的接口请求
import global from "@/utils/global.params.js";
import axios from "@/axios/config/axios.js";

const index = {
    // 新币榜请求
    newList() {
        return new Promise((resolve, reject) => {
            axios.post("/cec/newlist").then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },

    // 24H涨幅榜
    dayaAount() {
        return new Promise((resolve, reject) => {
            axios.post("/cec/amount").then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },

    // 下载地址
    utilDow() {
        return new Promise((resolve, reject) => {
            axios.post("/index/dowurl").then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },
    // 友情链接
    blogRoll() {
        return new Promise((resolve, reject) => {
            axios.post("/index/blogroll").then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },
    // 轮播图
    swiper() {
        return new Promise((resolve, reject) => {
            axios.post("/index/swiper").then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },
    // 首页-推荐币种
    recommend() {
        return new Promise((resolve, reject) => {
            axios.post("/index/recommend").then(res => {
                resolve(res)
            }).catch(err => {
                reject(err)
            })
        })
    },
}

export default index